﻿using System;
using wojilu.Web;
using wojilu.Web.GlobalApp;
using wojilu.Web.Jobs;
using wojilu.Web.Mvc;

namespace YBBWoJiLu
{
    public class Global : System.Web.HttpApplication
    {

        protected void Application_Start(object sender, EventArgs e)
        {
            SystemInfo.Init();
            MvcFilterLoader.Init();
            WebJobStarter.Init();
        }

        protected void Session_Start(object sender, EventArgs e)
        {

        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {
            SystemInfo.UpdateSessionId();
        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {
            AppGlobalHelper gh = AppGlobalHelper.New(sender);
            gh.LogError(true);
            gh.MailError();
            gh.ClearError();
        }

        protected void Session_End(object sender, EventArgs e)
        {

        }

        protected void Application_End(object sender, EventArgs e)
        {

        }

    }
}